﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MLSMooc.Helper;
using MLSMooc.BO;
using System.Threading.Tasks;
using MLSMooc.DAO.Implement.Search;

namespace MLSMooc.Controllers
{
    public class SearchController : Controller
    {
        private static SearchDAO searchDAO = SearchDAO.Getinstance();
        [HttpGet]
        public async Task<string> GetProMp4ByNameinfo(string Name)
        {
            var res = await searchDAO.GetProMp4ByNameinfo(Name);
            return SerializeHelper.SerializeJson(res);
        }

        [HttpGet]
        public async Task<string> GetCourseMp4ByNameinfo(string Name)
        {
            var res = await searchDAO.GetCourseMp4ByNameinfo(Name);
            return SerializeHelper.SerializeJson(res);
        }
    }
}